package com.baizhi.entity;

import java.io.DataOutput;
import java.io.Serializable;
//购物车实体类  保存在redis中  实现序列化接口
public class Cart implements Serializable {
    private Integer cid;//购物车编号
    private String pname;
    private Double price;
    private Integer size;//加人购物车的商品数量

    public Cart() {
    }

    public Cart(Integer cid, String pname, Double price, Integer size) {
        this.cid = cid;
        this.pname = pname;
        this.price = price;
        this.size = size;
    }

    public Integer getCid() {
        return cid;
    }

    public void setCid(Integer cid) {
        this.cid = cid;
    }

    public String getPname() {
        return pname;
    }

    public void setPname(String pname) {
        this.pname = pname;
    }

    public Double getPrice() {
        return price;
    }

    public void setPrice(Double price) {
        this.price = price;
    }

    public Integer getSize() {
        return size;
    }

    public void setSize(Integer size) {
        this.size = size;
    }

    @Override
    public String toString() {
        return "Cart{" +
                "cid=" + cid +
                ", pname='" + pname + '\'' +
                ", price=" + price +
                ", size=" + size +
                '}';
    }
}
